Parametric Polymorphism Optimization for Deeply Nested Types in Computer Algebra
نویسندگان
چکیده
Computer algebra systems, such as Axiom, and programming languages designed for computer algebra, such as Aldor, have very flexible mechanisms for generic code, with type parameterization. Modern versions of Maple can support this style of programming through the use of Maple's module system, and by using module-producing functions to give parametric type constructors. From the software design point of view, generic programming allows better code re-usability so main-stream programming languages, such as C++ and Java, have evolved to support it. Computer algebra programs that use parametric polymorphism tend to do so very heavily, leading to deeply nested type constructions. Optimization of deeply nested type constructions thus becomes an important problem for system efficiency. The goal of the current work is to present optimizations for this situation. Our approach is to specialize generic types at compiletime, based on global program analysis. We anticipate that the problem of optimizing deeply nested type construction will also find application outside computer algebra.
منابع مشابه
Type Specialization in Aldor
Computer algebra in scientific computation squarely faces the dilemma of natural mathematical expression versus efficiency. While higher-order programming constructs and parametric polymorphism provide a natural and expressive language for mathematical abstractions, they can come at a considerable cost. We investigate how deeply nested type constructions may be optimized to achieve performance ...
متن کاملParametric Polymorphism for Computer Algebra Software Components
This paper presents our experiments in providing mechanisms for parametric polymorphism for computer algebra software components. Specific interfaces between Aldor and C++ and between Aldor and Maple are described. We then present a general solution, Generic IDL (GIDL), an extension to CORBA IDL supporting generic types. We describe our language bindings for C++, Java 1.5 and Aldor as well as a...
متن کاملOn the Classification of Parametric Cubic Curves
We consider the question of characterizing the behavior of parametric curves whose components are cubic polynomials. When there is no chance of confusion, we will refer to such curves as cubic curves with the understanding that each of x(t) and y(t) are themselves cubic polynomials. We classify various types of parametric cubics using their defining coefficients. We show that this can be done i...
متن کاملA Class of Nested Iteration Schemes for Generalized Coupled Sylvester Matrix Equation
Global Krylov subspace methods are the most efficient and robust methods to solve generalized coupled Sylvester matrix equation. In this paper, we propose the nested splitting conjugate gradient process for solving this equation. This method has inner and outer iterations, which employs the generalized conjugate gradient method as an inner iteration to approximate each outer iterate, while each...
متن کاملA Uniform Calculus for Collection Types
We present a new algebra for collection types based on monoids and monoid ho-momorphisms. The types supported in this algebra can be any nested composition of collection types, including lists, sets, multisets (bags), vectors, and matrices. We also deene a new calculus for this algebra, called monoid comprehensions, that captures operations involving multiple collection types in declarative for...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005